$OpenBSD: patch-CMakeLists_txt,v 1.3 2014/11/29 13:25:05 sthen Exp $
--- CMakeLists.txt.orig	Tue Apr 29 08:15:05 2014
+++ CMakeLists.txt	Fri Nov 28 23:49:58 2014
@@ -99,7 +99,10 @@ endif()
 option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
 
 string(TOLOWER ${PROJECT_NAME} projectname)
-set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+
+if(NOT OPENJPEG_INSTALL_SUBDIR)
+  set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+endif()
 
 if(NOT OPENJPEG_INSTALL_BIN_DIR)
   set(OPENJPEG_INSTALL_BIN_DIR "bin")
